//-----------------------------------------------------------------------------
// Name: TuningParser.h
// Author: Brad Smith, Dante Ratto, Paul Godfrey, and Rob Darty
// Desc: A simple text parser for tuning file format
//-----------------------------------------------------------------------------

#ifndef _TUNINGPARSER_
#define _TUNINGPARSER_

#pragma once

#include "SharedConstants.h"

#include <map>
#include <string>

class cTuningParser
{
public:
   cTuningParser();
   cTuningParser(const char* fileName);
   ~cTuningParser();

   enum eParseReturn
   {
      kParseFail,
      kParseSuccess,
      kParseNoFile,
      kParseSyntaxError,
   };

   eParseReturn ParseFile(const char* fileName);

   eParseReturn ReparseFile();

   bool GetTuningFloat(const char* tuningName, float& tuningVal);
   bool GetTuningInt(const char* tuningName, int& tuningVal);
   bool GetTuningString(const char* tuningName, std::string& tuningVal);
   bool GetTuningBool(const char* tuningName, bool& tuningVal);

private:
   std::map< std::string, float > mFloatData;
   std::map< std::string, int > mIntData;
   std::map< std::string, std::string > mStringData;
   std::map< std::string, bool > mBoolData;

   std::string mFileName;
};

#endif